CGI perl : formating the output
am 20.03.2009 17:26:26 von perl perl--===============1197740560==
Content-Type: multipart/alternative; boundary=0016e644de6cd5377604658f60b6
--0016e644de6cd5377604658f60b6
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Dear All,
I am new to Perl CGI and few querries regarding formating and
dispaying the output message. I have written below script and the problem I
am facing with this script is as below.
1) At the start of the script the (before enterring the user name and
password ), it shows the message "*You have not enterred some field"
,*(this is the print statement I used to check user has enter the data
or
not.).
2) I want the out put to be displayed line by line like username in first
line and passwrd in second line ( we can hide the password with ****)
3) When I run the script it shows the* output along with the login window*.
I don't want to display the login window, only I want to see the output
message.
we can do one thing, if password or user id is wrong, then we can prompt
for login window by saying enterred information is wrong.
Please help to overcome this issue.
**
#!/usr/local/bin/perl -w
use CGI;
my $q = new CGI;
print $q -> header,
$q -> start_html(),
$q -> start_form(),
$q->table
(
$q -> Tr
( [
$q ->td(['Enter User Name :',
$q -> textfield ( -name => 'username',
-size => '50'
) ] ),
#print "Password",
$q ->td( ['Enter Password:',
$q -> password_field( -name => 'pass',
-size => '50',
) ] ),
]),
);
print $q-> submit();
print $q -> end_form();
#print $q -> end_html();
if( $q -> param("username") and $q -> param("pass"))
{
print $q -> param("username");
print $q -> param("pass");
}
else
{
print "You have not enterred some field \n";
}
#print $q -> end_form();
print $q -> end_html();
--
--
Regards,
Mujju
--0016e644de6cd5377604658f60b6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
mating and dispaying the output message. I have written below script and th=
e problem I am facing with this script is as below.
password ), it shows the message "You have not enterred some f=
ield" , (this is the print statement I used to check=A0user h=
as enter the data or not.).
rst line and passwrd in second line ( we can hide the password with ****)=
div>
gin window. I don't want to display the login window, only I w=
ant to see the output message.
en we can prompt for login window by saying enterred information is wrong. =
use CGI;
my $q =3D new CGI;
print $q -> header,
=A0 $q -> start_html(),
=A0 =
$q -> start_form(),
$q->table
(
=A0 $q -> Tr
=A0 ( [
r> $q ->td(['Enter User Name=A0:',
$q ->=
; textfield ( -name =3D> 'username',
=A0=
-size =3D> '50'
=
=A0 ) ] ),
#print "Password",
$q -=
>td( ['Enter=A0Password:', =A0
=A0 $q ->=
password_field( -name =3D> 'pass',
=A0=
-size =3D> '50',
=
) ] ),
]),
);
=A0 print $q-> submit();
=A0 print $q ->=
; end_form();
=A0 #print $q -> end_html();
if( $q ->=
; param("username") and $q -> param("pass"))
{=A0=
=A0 print $q -> param("username");
=A0 print $q -> param("pass");
}
else
{
=
print "You have not enterred some field \n";
}
=A0=
#print $q -> end_form();
=A0 print $q -> =
end_html();
=A0
--
--
Regards,
Mujju=20
--0016e644de6cd5377604658f60b6--
--===============1197740560==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1197740560==--
Re: CGI perl : formating the output
am 20.03.2009 17:52:25 von fzarabozoSo... regardless how many times people in this group have told you to "use
strict", you still don't.
And, you have started taking this group as an alternative to reading the
documentation or doing a Google search for tutorials.
You are not really presenting here a problem to discuss or to get help on.
You are just giving instructions on how someone should write/modify a script
for you.
I don't think that's the way to get help here. But hey, I might be wrong -
let's see if someone else thinks the opposite.
Paco
> From: Perl Perl
> Sent: Friday, March 20, 2009 10:26 AM
> To: activeperl@listserv.activestate.com
> Subject: CGI perl : formating the output
>
>
>
>
> Dear All,
> I am new to Perl CGI and few querries regarding formating and
> dispaying the
> output message. I have written below script and the problem I am facing
> with this
> script is as below.
> 1) At the start of the script the (before enterring the user name and
> password ), it
> shows the message "You have not enterred some field" , (this is the print
> statement
> I used to check user has enter the data or not.).
> 2) I want the out put to be displayed line by line like username in first
> line and
> passwrd in second line ( we can hide the password with ****)
> 3) When I run the script it shows the output along with the login window.
> I don't
> want to display the login window, only I want to see the output message.
>
> we can do one thing, if password or user id is wrong, then we can
> prompt for
> login window by saying enterred information is wrong.
>
> Please help to overcome this issue.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: CGI perl : formating the output
am 20.03.2009 18:40:13 von perl perl--===============0176693555==
Content-Type: multipart/alternative; boundary=0016e641db12c0e20a046590684d
--0016e641db12c0e20a046590684d
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Dear Paco and Activeperl team,
I never tried to use this forum in wrong way. to be honest I tried
my all guns to overcome those issue since morning and at the last I thought
let me get the help from our dear friends.
As I said I am beginer, I started CGI script 2 days before ( I was going
through material sometime but not practice ). And I don't have any idea in
CGI how to print and statement association.
I request all of don't feel that I am using this forum in wrong way.
Now I left with login page and initail message as I mentioned in last mail.
1) At the start of the script the (before enterring the user name and
password ), it shows the message "You have not enterred some field" ,
3) When I run the script it shows the output along with the login window. I
don't want to display the login window, only I want to see the output
message.
Any help will be appreciated.
Thanks,
On 3/20/09, Francisco Zarabozo
>
>
> So... regardless how many times people in this group have told you to "use
> strict", you still don't.
>
> And, you have started taking this group as an alternative to reading the
> documentation or doing a Google search for tutorials.
>
> You are not really presenting here a problem to discuss or to get help on.
> You are just giving instructions on how someone should write/modify a script
> for you.
>
> I don't think that's the way to get help here. But hey, I might be wrong -
> let's see if someone else thinks the opposite.
>
>
> Paco
>
>
>
>
> From: Perl Perl
>> Sent: Friday, March 20, 2009 10:26 AM
>> To: activeperl@listserv.activestate.com
>> Subject: CGI perl : formating the output
>>
>>
>>
>>
>> Dear All,
>> I am new to Perl CGI and few querries regarding formating and
>> dispaying the
>> output message. I have written below script and the problem I am facing
>> with this
>> script is as below.
>> 1) At the start of the script the (before enterring the user name and
>> password ), it
>> shows the message "You have not enterred some field" , (this is the print
>> statement
>> I used to check user has enter the data or not.).
>> 2) I want the out put to be displayed line by line like username in first
>> line and
>> passwrd in second line ( we can hide the password with ****)
>> 3) When I run the script it shows the output along with the login window.
>> I don't
>> want to display the login window, only I want to see the output message.
>>
>> we can do one thing, if password or user id is wrong, then we can
>> prompt for
>> login window by saying enterred information is wrong.
>>
>> Please help to overcome this issue.
>>
>
>
>
--
--
Regards,
Mujju
--0016e641db12c0e20a046590684d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
to be honest I tried my all guns to overcome those issue since morning and=
at the last I thought let me get the help from our dear friends.
ng through material sometime but not practice ). And I don't have any i=
dea in CGI how to print and statement association.
y.
mail.
=A0
rring the user name and password ), it shows the message "You have not=
enterred some field" ,
long with the login window. I don't want to display the login window, o=
nly I want to see the output message.
=A0
=A0
Francisco Zarabozo <fzarabo=
zo@hotmail.com> wrote:
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
So... regardless how many ti=
mes people in this group have told you to "use strict", you still=
don't.
And, you have started taking this group as an alternative to reading th=
e documentation or doing a Google search for tutorials.
You are not =
really presenting here a problem to discuss or to get help on. You are just=
giving instructions on how someone should write/modify a script for you.
r>
I don't think that's the way to get help here. But hey, I might=
be wrong - let's see if someone else thinks the opposite.
P=
aco
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">From: Perl Perl
Sent: Friday,=
March 20, 2009 10:26 AM
To:
dow,event,this)" href=3D"mailto:activeperl@listserv.activestate.com" target=
=3D"_blank">activeperl@listserv.activestate.com
Subject: CGI perl : formating the output
<=
br>Dear All,
=A0 =A0 =A0 I am new to Perl CGI and few querries regarding=
formating and dispaying the
=A0output message. I have written below scr=
ipt and the problem I am facing with this
script is as below.
1) At the start of the script the (before enterring =
the user name and password ), it
shows the message "You have not en=
terred some field" , (this is the print statement
I used to check u=
ser has enter the data or not.).
2) I want the out put to be displayed line by line like username in first l=
ine and
=A0passwrd in second line ( we can hide the password with ****)<=
br>3) When I run the script it shows the output along with the login window=
.. I don't
want to display the login window, only I want to see the output message.
>
=A0 =A0we can do one thing, if password or user id is wrong, then we c=
an prompt for
login window by saying enterred information is wrong.
<=
br>
Please help to overcome this issue.
uote>
--
--
Regards,
Mujju=20
--0016e641db12c0e20a046590684d--
--===============0176693555==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0176693555==--
Re: CGI perl : formating the output
am 20.03.2009 21:59:04 von Todd BeverlyHi
My notes below are pseudo code, but it should get you get you started in
the right direction. If you don't want to display the login window, you
have to check for it before you output the form.
Perl Perl wrote:
>
> Dear All,
> I am new to Perl CGI and few querries regarding formating and
> dispaying the output message. I have written below script and the
> problem I am facing with this script is as below.
> 1) At the start of the script the (before enterring the user name and
> password ), it shows the message "*You have not enterred some field"
> ,* (this is the print statement I used to check user has enter the
> data or not.).
> 2) I want the out put to be displayed line by line like username in
> first line and passwrd in second line ( we can hide the password with
> ****)
> 3) When I run the script it shows the* output along with the login
> window*. I don't want to display the login window, only I want to see
> the output message.
> we can do one thing, if password or user id is wrong, then we can
> prompt for login window by saying enterred information is wrong.
>
> Please help to overcome this issue.
> **
> #!/usr/local/bin/perl -w
use strict; # always a good idea.
use CGI::Carp qw(fatalsToBrowser); # a good idea while you're debugging a cgi script.
#It will show you perl errors in the browser.
> use CGI;
> my $q = new CGI;
>
> print $q -> header,
> $q -> start_html(),
>
##### Check for your parameters here. If the parameters exist, then it
must be the second time the page has been run. (Do your checks.)
##### If the parameters don't exist, then show your form.
if ($q->param) {
## parameters exist, do checks for valid username and password.
}
else
{
# just show the form.
}
>
> $q -> start_form(),
> $q->table
> (
> $q -> Tr
> ( [
> $q ->td(['Enter User Name :',
> $q -> textfield ( -name => 'username',
> -size => '50'
> ) ] ),
> #print "Password",
> $q ->td( ['Enter Password:',
> $q -> password_field( -name => 'pass',
> -size => '50',
> ) ] ),
> ]),
> );
>
> print $q-> submit();
> print $q -> end_form();
> #print $q -> end_html();
>
> #if( $q -> param("username") and $q -> param("pass"))
> #{
> # print $q -> param("username");
>
> # print $q -> param("pass");
> #}
> #else
> #{
> # print "You have not enterred some field \n";
> #}
> # #print $q -> end_form();
>
> print $q -> end_html();
>
>
>
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs